A conventional image processing circuit for a digital still camera and the like adopts a configuration as shown in FIG. 1. In FIG. 1, an object image is formed on an image sensing element 104 via main photographing optical systems 102 and 103. Electrical signals from the image sensing element 104 are input to a CDS/AGC circuit to remove reset noise from the signals by a known method such as correlated double sampling. The resultant signals are input to an A/D conversion circuit 106, and sequentially converted pixel by pixel into digital signals with a predetermined bit width.
Outputs from the A/D conversion circuit 106 are input to a memory controller 115 via a selector 109 which selects a signal on the basis of a signal from an overall control CPU 100. The memory controller 115 transfers all signal outputs to a frame memory 116. In this case, all pixel data of each photographing frame are temporarily stored in the frame memory 116. In sequential shooting or the like, all data are written in the frame memory 116.
After the end of photographing operation, the contents of the frame memory 116 which stores photographing data are transferred to a camera DSP 110 via the selector 109 under the control of the memory controller 115. The camera DSP 110 generates R, G, and B color signals on the basis of respective pixel data of each photographing data stored in the frame memory.
Generally before photographing, the result is transferred to a video memory 111 periodically (for each frame), and displayed on the viewfinder or the like via a monitor display means 112.
When the photographer performs photographing operation by a manipulation to a camera operation switch 101, pixel data of one frame are read out from the frame memory 116 in accordance with a control signal from the overall control CPU 100. The pixel data are subjected to an image process by the camera DSP 110, and then temporarily stored in a work memory 113.
Data in the work memory 113 is compressed by a compression/decompression means 114 on the basis of a predetermined compression format, and the result is stored in an external nonvolatile memory 117 (a nonvolatile memory such as a flash memory is generally used).
To observe photographed image data, data compressed and stored in the external memory is decompressed into normal data of each photographing pixel by the compression/decompression means 114. The result is transferred to the video memory 111, and the image is displayed on the monitor display means 112.
In a general digital camera, an output from the image sensing element 104 is converted into actual image data via the process circuit in almost real time, and the result is output to the memory or monitor circuit.
Generally in this digital camera system, the black level of A/D-converted image data is not 0. In order to set the black level to 0, offset correction of subtracting a predetermined value from entire image data in a camera DSP or the like, or a digital image process such as digital OB clamping must be executed. In a conventional digital image process by the camera DSP or the like, addition/subtraction is done at the precision of the quantization step of the A/D conversion circuit, and the playback precision of the black level is low. Since the clamping level has only the precision of the quantization step in performing digital OB clamping at different clamping levels for respective horizontal lines of an image, horizontal line noise of the quantization step occurs.
Recently, the algorithms of digital image processes are becoming more advanced and more complicated along with the spread of digital cameras and digital image processes. As the image process becomes more complicated, accumulation of the quantization error (noise) is inevitable, as described above, and may greatly affect the image quality.
Conventionally, the influence of the quantization error on the image quality is reduced by expanding the number of bits by, e.g., adding 0 to lower bits of the bit string of image data or shifting the bit string to the left. However, this method leads to a large image data capacity, a large image processing circuit scale, and a low image processing speed. This method makes the design difficult as the number of pixels of image data increases year by year.
Some prior arts (e.g., Japanese Patent Laid-Open No. 9-284595) implement clamping at a precision equal to or lower than the quantization step in an analog image process after the clamping level is obtained from digital image data at a precision equal to or lower than the quantization step and converted into an analog voltage value by a D/A converter. However, the analog image process is essentially more susceptible to external noise than the digital image process. If noise is mixed during the clamping process, it affects the image quality. Since clamping is performed in the analog circuit, the degree of freedom for determining the image process order or clamping level decreases.